<!--grid-->
<div class="">
  <br>
  <div class="homepage-pop">
    <div class="grid-header">
      <div class="grid-title" *ngFor="let column of columns">{{column.title}}</div>
    </div>
    <div class="grid-container">
      <div class="grid-item" *ngFor="let row of rows">
        <div class="grid-itemInfo">
          <div class="grid-itemInfoImg">
            <img src="{{row.imageUrl}}" alt="">
          </div>
        </div>
        <div class="grid-itemInfo">{{row.imageId}}</div>
        <div class="grid-itemInfo">{{row.pageName}}</div>
        <div class="grid-itemInfo">{{row.typeName}}</div>
        <div class="grid-itemInfo">{{row.createdTime | date:'yyyy-MM-dd HH:mm:ss'}}</div>
        <div class="grid-itemInfo">
          <button class="action-btn btn-invalid" 
                  style="margin-right: 10px;" 
                  *ngIf="row.enabled == '0'"
                  (click)="IsEnable(row.homePagePopId, row.enabled, row.homePageType)">目前禁用</button>
          <button class="action-btn" 
                  style="margin-right: 10px;" 
                  *ngIf="row.enabled == '1'"
                  (click)="IsEnable(row.homePagePopId, row.enabled, row.homePageType)">目前启用</button>
        </div>
        <div class="grid-itemInfo">
          <button class="action-btn" (click)="openEditModal(row.homePagePopId)">编辑</button>
        </div>
      </div>
    </div>
    <pagination *ngIf="rows"
                class="pagination-sm"
                [(ngModel)]="page"
                [totalItems]="totalItems"
                [itemsPerPage]="itemsPerPage"
                [maxSize]="maxSize"
                [boundaryLinks]="true"
                [rotate]="false"
                [firstText]="localText.firstBtn"
                [lastText]="localText.lastBtn"
                [previousText]="localText.previousBtn"
                [nextText]="localText.nextBtn"
                (pageChanged)="onChangeTable($event)"
                (numPages)="numPages = $event">
    </pagination>
    <pre *ngIf="rows" class="card card-block card-header">页数: {{page}} / {{numPages}}</pre>
  </div>
</div>
<app-homepage-pop-edit #homePagePopEdit (homepagePopEdit)="onChangeTable()"></app-homepage-pop-edit>